//
//  AppliedJobCell.m
//  Job
//
//  Created by 如此的你 on 2018/8/23.
//  Copyright © 2018年 桑赐相. All rights reserved.
//

#import "AppliedJobCell.h"

@interface AppliedJobCell()
@property (weak, nonatomic) IBOutlet UILabel *jobTitle;
@property (weak, nonatomic) IBOutlet UILabel *location;
@property (weak, nonatomic) IBOutlet UILabel *appliedTime;
@property (weak, nonatomic) IBOutlet UILabel *salaryLabel;
@property (weak, nonatomic) IBOutlet UILabel *jobStatus;



@end

@implementation AppliedJobCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setJob:(JobModel *)job {
    _job = job;
    self.jobTitle.text = job.title;
    self.location.text = job.location == nil ? @"不限" : job.location;

    self.appliedTime.text = [NSString stringWithFormat:@"投递于：%@", [job.apply_time stringWithDate:@"MM-dd HH:ss"]];
    
    self.salaryLabel.text = job.money;
    
    /** 1=已申请 2=已查看 3=已拒绝 4=已同意 */
    switch (job.state) {
        case 2:
            self.jobStatus.text = @"已查看";
            break;
        case 3:
            self.jobStatus.text = @"已拒绝";
            break;
        case 4:
            self.jobStatus.text = @"已同意";
            break;
        default:
            self.jobStatus.text = @"申请中";
            break;
    }
    
}



@end
